<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/html/axios.min.js"></script>
    <script src="/html/util.js"></script>
    <script>
         function land() {
            axios.get("/user/login",{
                params:{
                    userName:$("name").value,
                    pwd:$("pwd").value
                }
            }).then(e => {
                if (e.data == "ok"){
                    location.href="/html/index.html"
                }else {
                    $("spanId").innerHTML="登录失败"
                }
            })
        }
    </script>
</head>
<body>
    <span id="spanId" style="color: red"></span>
    用户民：<input type="text" id="name"><br>
    用户密码：<input type="password" id="pwd"><br>
    <input type="button" value="登录" onclick="land()"><br>
    <a href="register.html">注册</a>
</body>
</html>